Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rtl-css-js

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rtl-css-js

Right To Left conversion for CSS in JS objects

  • 1.16.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.5M
decreased by-13.63%
Maintainers
1
Weekly downloads
 
Created

What is rtl-css-js?

The rtl-css-js npm package is designed to convert CSS styles written for left-to-right (LTR) layouts into right-to-left (RTL) layouts. This is particularly useful for developers creating or maintaining websites and applications that need to support multiple languages, including those read from right to left, such as Arabic and Hebrew. The package provides a straightforward API to transform CSS objects, making it easier to manage styles in multilingual projects.

What are rtl-css-js's main functionalities?

Convert LTR CSS to RTL

Converts a CSS object with left-based properties to right-based ones for RTL support. For example, 'paddingLeft: 10px' becomes 'paddingRight: 10px'.

{"paddingLeft": "10px"}

Handle Flipping Values

Automatically flips certain CSS values to their opposite direction. For instance, 'textAlign: left' is converted to 'textAlign: right' for RTL layouts.

{"textAlign": "left"}

Ignore Specific Properties

Allows specific CSS properties to be ignored during the conversion process by using a special comment directive. This is useful for properties that should not change direction.

{"/* rtl:ignore */ paddingLeft": "10px"}

Other packages similar to rtl-css-js

Keywords

FAQs

Package last updated on 21 Dec 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc